package com.harmonypilot.modelconfig.config;

import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
import org.springframework.stereotype.Component;

@Component
public class DynamicConfig {
    public String getSiteBanner() {
        // 优先从 modelcfg namespace 读取，其次 application；默认值回退
        Config modelcfg = ConfigService.getConfig("modelcfg");
        String v = modelcfg.getProperty("site.banner", null);
        if (v != null) return v;
        Config app = ConfigService.getAppConfig();
        return app.getProperty("site.banner", "OpenHarmony · Model Config Center");
    }
}


